﻿using ERP.Workflow.Designer.Domain;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;

namespace WorkflowEngine.Entitys
{

    public class ActivityInstance : FullAuditedAggregateRoot<Guid>, IMultiTenant
    {
        [Description("步骤Id")]
        public Guid ActivityId { get; set; }
        [Description("步骤名称")]
        public string ActivityName { get; set; }

        [Description("步骤状态")]
        public ActivityStatus ActivityStatus { get; set; }

        [Description("步骤聚合完成时间")]
        public DateTime? ComplateTime { get; set; }
        [Description("步骤抵达时间")]
        public DateTime ArriveTime { get; set; }



        public Guid? TenantId { get; set; }

        public void SetTenantId(Guid tennaId) => TenantId = tennaId;

        [Description("下发时的节点信息")]
        public FlowNodeExtendValue NodeInfo { get; set; }
        void SetNodeInfo(FlowNodeExtendValue node)
        {
            NodeInfo = node;
        }


        public Guid WorkflowInstanceId { get; set; }
        public WorkflowInstance WorkflowInstance { get; set; }
        public List<ActivityTaskInstance> ActivityTaskInstances { get; set; }
    }


}